package action;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Timestamp;
import java.text.ParseException;
import java.util.Date;

import javax.servlet.ServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import service.tHistoryService;

public class AddtHistoryAction {
	
	private tHistoryService thistoryService;
	
	public String add() throws IOException, ParseException{
		System.out.println("jinru");
		ServletResponse response = ServletActionContext.getResponse();
		HttpSession session = ServletActionContext.getRequest().getSession();
		response.setCharacterEncoding("UTF-8");
		PrintWriter out = response.getWriter();
		
		Date date=new Date();
		Timestamp ts = new Timestamp(date.getTime());
		
		thistoryService.add(1, "2.7", "123456");
		
		return null;
	}

	public tHistoryService getThistoryService() {
		return thistoryService;
	}

	public void setThistoryService(tHistoryService thistoryService) {
		this.thistoryService = thistoryService;
	}
	

}
